<template>
  <div class="login-container">
    <div class="header">
      <el-form
        :inline="true"
        :model="formInline"
        class="demo-form-inline"
      >

        <el-form-item label="虚拟号码">
          <el-input
            v-model="input1"
            placeholder="请输入内容"
          />
        </el-form-item>

        <el-form-item label="员工手机号">
          <el-input
            v-model="input"
            placeholder="请输入内容"
          />
        </el-form-item>

        <el-form-item label="客户手机号码">
          <el-input
            v-model="input"
            placeholder="请输入内容"
          />
        </el-form-item>
        <el-form-item>
          <el-button
            type="text"
            icon="el-icon-search"
          >查找</el-button>
        </el-form-item>
        <el-form-item>
          <el-button
            type="text"
            icon="el-icon-close"
          >清空</el-button>
        </el-form-item>
      </el-form>
    </div>
    <div class="box">
      <el-row>

        <el-col :span="24">
          <el-table
            ref="multipleTable"
            tooltip-effect="dark"
            :data="tableData"
            style="width: 100%"
            :row-class-name="tableRowClassName"
            @selection-change="handleSelectionChange"
          >
            <el-table-column
              type="selection"
              width="55"
            />
            <el-table-column
              prop="date"
              label="请求ID"
              align="center"
            />

            <el-table-column
              prop="name"
              label="开始发送时间"
              align="center"
            />
            <el-table-column
              prop="name"
              label="虚拟号"
              align="center"
            />
            <el-table-column
              prop="name"
              label="员工手机号"
              align="center"
            />
            <el-table-column
              prop="address"
              label="客户手机号码"
              align="center"
            />
            <el-table-column
              prop="address"
              label="短信发起方"
              align="center"
            />
            <el-table-column
              prop="address"
              label="发送状态"
              align="center"
            />
            <el-table-column
              fixed="right"
              label="操作"
              width="200"
              align="center"
            >
              <template slot-scope="scope" />
            </el-table-column>
          </el-table>
        </el-col>
      </el-row>
    </div>

  </div>
</template>

<script>
export default {
  name: 'LoginIndex',
  components: {},
  props: {},
  data() {
    return {
      pickerOptions: {
        shortcuts: [
          {
            text: '最近一周',
            onClick(picker) {
              const end = new Date()
              const start = new Date()
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
              picker.$emit('pick', [start, end])
            }
          },
          {
            text: '最近一个月',
            onClick(picker) {
              const end = new Date()
              const start = new Date()
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
              picker.$emit('pick', [start, end])
            }
          },
          {
            text: '最近三个月',
            onClick(picker) {
              const end = new Date()
              const start = new Date()
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
              picker.$emit('pick', [start, end])
            }
          }
        ]
      },
      value1: [new Date(2000, 10, 10, 10, 10), new Date(2000, 10, 11, 10, 10)],
      value2: '',
      options: [
        {
          value: '选项1',
          label: '黄金糕'
        },
        {
          value: '选项2',
          label: '双皮奶'
        }
      ],
      value: '',

      input: '',
      input1: '',
      formInline: {
        user: '',
        region: ''
      },
      form: {
        name: '',
        region: '',
        date1: '',
        date2: '',
        delivery: false,
        type: [],
        resource: '',
        desc: ''
      },
      tableData: [
        {
          date: '----',
          name: '----',
          address: '----'
        },
        {
          date: '----',
          name: '----',
          address: '----'
        },
        {
          date: '----',
          name: '----',
          address: '----'
        }
      ],
      ruleForm: {
        name: '',
        region: '',
        date1: '',
        date2: '',
        delivery: false,
        type: [],
        resource: '',
        desc: ''
      }
    }
  },
  computed: {},
  watch: {},
  created() {},
  mounted() {},
  methods: {
    // 添加权限关闭事件
    CloseDistribution() {
      this.dialogVisibleDistribution = false
    },
    handleSelectionChange(val) {
      this.multipleSelection = val
      console.log(this.multipleSelection)
    },
    //   编辑按钮点击事件
    edit() {
      this.dialogVisiblebianji = true
    },
    // 增加按钮
    handleClick(row) {
      console.log(row)
      this.dialogVisibleDistribution = true
    },
    //   表格斑马线颜色
    tableRowClassName({ row, rowIndex }) {
      if (rowIndex % 2 == 0) {
        return 'warning-row'
      } else if (rowIndex % 2 == 1) {
        return 'success-row'
      }
      return ''
    }
  }
}
</script>

<style scoped lang="scss">
.table-box {
  width: 100%;
  height: 100px;
}
.login-container {
  margin-top: 50px;
}
.operation {
  display: flex;
  margin: 0 0 10px 0px;
  //   width: 250px;
  height: 50px;
  box-shadow: 1px 1px 3px #01726e;
  //   border-radius: 10px;
}
.header {
  box-shadow: 3px 0px 3px #01726e;
  margin-top: 30px;
  padding-left: 30px;
  padding-top: 15px;
  margin-bottom: 10px;
}
// dialog样式
.closeing {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background-color: #27bdb0;
  position: absolute;
  top: 0px;
  right: -32px;
  opacity: 1;
  .iconc {
    color: #000000;
    display: block;
    width: 30px;
    height: 30px;
    font-size: 20px;
    opacity: 1;
    line-height: 30px;
    text-align: center;
  }
}
.header-title {
  position: absolute;
  width: 100%;
  height: 45px;
  left: 0;
  top: 0;
  background-color: #27bdb0;
}
.closeing:hover {
  background-color: #006f6b !important;
}
</style>
<style>
/* 表格斑马线颜色设置 */
.el-table .warning-row {
  background: #f3fdfc;
}

.el-table .success-row {
  background: #fff;
}
</style>

